package com.token.utils;

import org.springframework.validation.ObjectError;

import java.util.List;

/**
 * @auther: henriy
 * @Date: 2024/1/4
 */
public class ParamHandleUtils {

    public static String handleParam(List<ObjectError> allErrors) {
        StringBuilder stringBuilder = new StringBuilder();
        for (ObjectError allError : allErrors) {
            stringBuilder.append(allError.getDefaultMessage()).append(",");
        }

        String string = stringBuilder.toString();
        return string.substring(0, string.length() - 1);
    }

}
